/*
 * function.cpp
 *
 * Version: $Id: function.cpp 47 2011-11-09 19:41:48Z s8376@pjwstk.edu.pl $
 */
#include <iostream>

using namespace std;

void writeArray(int** array, int& size)
{
    for (int x = 0; x < size; x++) {
        cout << *array[x] << " ";
    }
    cout << endl;
}
void podzial(int* A, int dlugoscA, int** B, int& dlugoscB, int** C, int& dlugoscC)
{
    int counterB = 0, counterC = 0;

    for (int x = 0; x < dlugoscA; x++) {
        if (A[x] % 2 == 0) {
            B[counterB] = &(A[x]);
            counterB++;
        } else {
            C[counterC] = &A[x];
            counterC++;
        }
    }

    writeArray(B, counterB);
    writeArray(C, counterC);
}
